home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / Info.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  3.6 KB  |  176 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Info.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Theory of Operation
  13.  * 
  14.  * 
  15.  *  Classes defined in this interface
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_ODInfo_xh
  21. #define SOM_ODInfo_xh
  22.  
  23. class ODInfo;
  24.  
  25. #define ODInfo_MajorVersion 0
  26. #define ODInfo_MinorVersion 0
  27.  
  28. /* C++ SOM defs */
  29. #include <somcls.xh>
  30. #include <somcm.xh>
  31.  
  32. /* C++ parent defs */
  33. #ifndef SOM_ODObject_xh
  34. #include <ODObject.xh>
  35. #endif
  36.  
  37. #ifndef ODInfo_API
  38. #define ODInfo_API
  39. /*
  40.  * -- The Class API
  41.  */
  42.  
  43. /*
  44.  * Start of user-defined types:
  45.  */
  46. class SOMClass;
  47. class SOMObject;
  48. class ODFrame;
  49. class ODFacet;
  50. class ODObject;
  51. class ODExtension;
  52. class ODInfo;
  53. class ODSession;
  54.  
  55. /*
  56.  * End of user-defined types.
  57.  */
  58.  
  59. #ifdef OLDIBMSOMAPISUPPORT
  60. #define ODInfoCClassData ODInfoClassData
  61. #define ODInfoNewClass(major,minor) somNewVersionedClassReference(ODInfo,major,minor)
  62. #endif
  63.  
  64. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  65. #define ODInfoMetaClass SOMClass
  66.  
  67. #if PRAGMA_ALIGN_SUPPORTED
  68. #  pragma options align=power
  69. #endif
  70.  
  71. /* The API to the ODInfo class object, and the methods it introduces. */
  72. SOMEXTERN struct ODInfoClassDataStructure {
  73. #ifdef OLDIBMSOMAPISUPPORT
  74.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  75. #else
  76.     long zero;
  77. #endif
  78.     somStaticClassInfo *sci;
  79.     somDToken        instanceDataToken;
  80.     long reserved [3];
  81.     somMToken reserved1;
  82.     somMToken ShowPartFrameInfo;
  83. } SOMDLINK ODInfoClassData;
  84.  
  85. #if PRAGMA_ALIGN_SUPPORTED
  86. #  pragma options align=reset
  87. #endif
  88.  
  89. #if !defined(ODInfo_Class_Source) && !defined(SOM_Module_info_Source)
  90. #if PRAGMA_IMPORT_SUPPORTED
  91. #pragma import list ODInfoClassData
  92. #endif
  93. #endif
  94.  
  95.  
  96. /*
  97.  * -- Typedefs and inline method declarations for left path inherited methods
  98.  * -- are omitted because this compilation had -museinheritedmethods in effect
  99.  */
  100.  
  101.  
  102. /*
  103.  * -- Typedefs for ODInfo Method Procedures
  104.  */
  105. SOMEXTERN {
  106. typedef ODBoolean   (* SOMLINK somTD_ODInfo_ShowPartFrameInfo)(ODInfo *somSelf, Environment *ev,
  107.         ODFacet* facet,
  108.         ODBoolean allowEditing);
  109. }
  110.  
  111. #endif /* ODInfo_API */
  112.  
  113.  
  114. /*
  115.  * -- This emitter treats Method Tokens as Thunks by default.
  116.  * -- Use the sc modifier "nothunks" to change this default
  117.  */
  118. #undef somresolve_
  119. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  120.  
  121. /*
  122.  * -- The C++ Wrapper Class for ODInfo
  123.  */
  124. class ODInfo : public ODObject
  125. {
  126. public:
  127.  
  128. // ODInfo::new registers use of the class object, and then uses somNew
  129. // to allocate memory and load the object method table pointer. 
  130. void *operator new(size_t size)
  131. {
  132.     SOM_IgnoreWarning(size);
  133.     // Allocate memory using the default allocator for ODInfo, and
  134.     // clear mem & set method table pointer, call basic initialization
  135. #ifdef SOMCHKNULL
  136.     void * __somResult = (void *)
  137.       somNewObject(ODInfo);
  138.     SOMCHKNULL(__somResult);
  139.     return __somResult;
  140. #else
  141.     return (void*) somNewObject(ODInfo);
  142. #endif
  143. }
  144.  
  145. // ODInfo::delete uses the default deallocator for the object's class.
  146. void operator delete(void * obj)
  147. {
  148.     if (obj) {
  149.         SOM_Resolve(obj,SOMObject,somFree)
  150.            ( (SOMObject*) obj );
  151.     }
  152. }
  153.  
  154. /* method: ShowPartFrameInfo */
  155. ODBoolean   ShowPartFrameInfo(Environment *ev,
  156.         ODFacet* facet,
  157.         ODBoolean allowEditing)
  158. {
  159.    #ifdef SOMCHKEXCEPT
  160.    ODBoolean __somResult = 
  161.       SOM_ResolveD(this,ODInfo,ODInfo,ShowPartFrameInfo)
  162.     (this,ev,facet,allowEditing);
  163.       SOMCHKEXCEPT;
  164.    return __somResult;
  165. #else
  166.    return SOM_ResolveD(this,ODInfo,ODInfo,ShowPartFrameInfo)
  167.     (this,ev,facet,allowEditing);
  168. #endif
  169. }
  170.  
  171. };   /* ODInfo */
  172.  
  173.  
  174.  
  175. #endif       /* SOM_ODInfo_xh */
  176.